
<template>
  <van-nav-bar
      title="标题"
      left-arrow
      @click-left="onClickLeft"
      @click-right="onClickRight"
  >
    <template #right>
      <van-icon name="search" size="18" />
    </template>

  </van-nav-bar>
  <router-view></router-view>
  <van-tabbar  @change="onChange" route>
    <van-tabbar-item to="/" icon="home-o" name="Index">主页</van-tabbar-item>
    <van-tabbar-item to="/Team" icon="search" name="Team">队伍</van-tabbar-item>
    <van-tabbar-item to="/User" icon="friends-o" name="User">个人</van-tabbar-item>
  </van-tabbar>
</template>
<script setup  lang="ts">
import {showToast} from "vant";
import {useRouter} from "vue-router";
const router = useRouter();
const onClickLeft = () => history.back();
const onClickRight = () =>
{
      router.push("/Search")
}

const onChange = (index) => showToast(`标签 ${index}`);
</script>

<style scoped>

</style>